home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-04 | 44.0 KB | 1,271 lines |
- C.S.M.P. Digest Tue, 12 May 92 Volume 1 : Issue 78
-
- Today's Topics:
-
- Question opening data fork
- Touch-a-folder code -- can someone repost?
- Does anyone know about "Time-Saver Engines"?
- question: THINK C "real window" console available?
- TextWidth Weirdness
- Reading binary input
- Symantec FTP Site
- Doing playthru on a Quadra
- How do you get the top, left, width, and heighth from a WIND
- BASIC on the mac
- More help with app startup tracing, please.
- ATTN: Addison Weseley (sp): Book idea
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- These digests are available (by using FTP, account anonymous, your email
- address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
- edu. This is also the home of the comp.sys.mac.programmer Frequently Asked
- Questions list. The last several issues of the digest are available from
- sumex-aim.stanford.edu as well.
-
- These digests are also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new digest as it is created.
-
- The digest is a collection of articles from the internet newsgroup comp.sys.
- mac.programmer. It is designed for people who read c.s.m.p. semi-regularly
- and want an archive of the discussions. If you don't know what a newsgroup
- is, you probably don't have access to it. Ask your systems administrator(s)
- for details. (This means you can't post questions to the digest.)
-
- The articles in these digests are taken directly from comp.sys.mac.programmer.
- They are not edited; all articles included in this digest are in their original
- posted form. The only articles that are -not- included in these digests are
- those which didn't receive any replies (except those that give information
- rather than ask a question). All replies to each article are concatenated
- onto the original article in the order in which they were received. Article
- threads are not added to the digests until the last article added to the
- thread is at least one month old (this is to ensure that the thread is dead
- before adding it to the digests).
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
- -------------------------------------------------------
-
- From: skinner@oread.cc.ukans.edu
- Subject: Question opening data fork
- Date: 9 Apr 92 09:14:55 GMT
- Organization: University of Kansas Academic Computing Serces
-
- Just a quick question. Can someone tell me what I am doing
- wrong with this:
-
- type
- FCBPBHdl = ^FCBPBPtr;
- FCBPBPtr = ^FCBPBRec;
- paramBlock = FCBPBRec;
-
- var
- dataForkInfo: FCBPBPtr;
-
- begin
- dataForkInfo := FCBPBPtr(NewPtr(SizeOf(paramBlock)));
- dataForkInfo^.ioRefNum := fileReferenceNumber;
- dataForkInfo^.ioFCBIndx := 0;
- OSResult := PBGetFCBInfo(dataForkInfo, false);
- end;
-
- THINK tells me that the dataForkInfo variable in the O
- PBGetFCBInfo call is of the wrong type but according
- to IM it is supposed to be a FCBPBPtr which I believe is
- what it is Tnaks.
-
-
-
- exit
-
- +++++++++++++++++++++++++++
-
- From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
- Date: 9 Apr 92 20:56:46 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .cc.ukans.edu> skinner@oread.cc.ukans.edu writes:
-
- begin
- dataForkInfo := FCBPBPtr(NewPtr(SizeOf(paramBlock)));
- dataForkInfo^.ioRefNum := fileReferenceNumber;
- dataForkInfo^.ioFCBIndx := 0;
- OSResult := PBGetFCBInfo(dataForkInfo, false);
- end;
-
- THINK tells me that the dataForkInfo variable in the O
- PBGetFCBInfo call is of the wrong type but according
- to IM it is supposed to be a FCBPBPtr which I believe is
-
- Well, why don't you switch to "C" where a quick cast to
- void * fixes it all ? :-)
-
- Seriously, I believe it actually might need another of those
- strange union types...
-
- Anyway, you do some other things wrong, like not assigning
- the ioNamePtr to point to a Str255 - even though the arrow
- is pointing left, you have to do that. And you should
- use NewPtrClear instead of NewPtr. And, most important,
- you should de-allocate your memory when you're done...
-
- - --
- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
-
- +++++++++++++++++++++++++++
-
- From: Keith_Rollin@taligent.com (Keith Rollin)
- Date: 10 Apr 92 21:35:43 GMT
- Organization: Taligent
-
- In article <1992Apr9.031455.1@oread.cc.ukans.edu>, skinner@oread.cc.ukans.edu
- writes:
- >
- > Just a quick question. Can someone tell me what I am doing
- > wrong with this:
- >
- > type
- > FCBPBHdl = ^FCBPBPtr;
- > FCBPBPtr = ^FCBPBRec;
- > paramBlock = FCBPBRec;
- >
- > var
- > dataForkInfo: FCBPBPtr;
- >
- > begin
- > dataForkInfo := FCBPBPtr(NewPtr(SizeOf(paramBlock)));
- > dataForkInfo^.ioRefNum := fileReferenceNumber;
- > dataForkInfo^.ioFCBIndx := 0;
- > OSResult := PBGetFCBInfo(dataForkInfo, false);
- > end;
- >
- > THINK tells me that the dataForkInfo variable in the O
- > PBGetFCBInfo call is of the wrong type but according
- > to IM it is supposed to be a FCBPBPtr which I believe is
- > what it is Tnaks.
-
- I don't see the problem with your routine off the top of my head, but doesn't
- THINK Pascal have the problem of not showing exactly where the type problem is?
- For instance, could it be that the problem is with OSResult and not
- dataForkInfo? Could you have declared OSResult as an INTEGER and not OSErr?
-
- Also, what version of THINK Pascal are you using? I remember that Symantec used
- to do some things with their header files that would make them differ from
- Inside Mac and MPW conventions. With the latest version of THINK C and Pascal,
- header/interface files are more consistant with MPW and Inside Mac.
-
- I'd also like to mention a few pointers:
-
- - - Don't create the parameter block on the heap. There's no need for this,
- especially since you are making a synchronous call. Simply declare the buffer on
- the stack and use that.
-
- - - Fill in the ioNamePtr field. GetFCBInfo will use the value in that field as a
- pointer to a string buffer into which to put the name of the file. If you leave
- that field at a random value, GetFCBInfo will store the name into a random place
- in memory.
-
- I'd probably write the routine as follows:
-
- VAR
- dataForkInfo: FCBPBRec;
- fileName: Str255;
- OSResult: OSErr;
-
- BEGIN
- dataForkInfo.ioRefNum := fileReferenceNumber;
- dataForkInfo.ioFCBIndx := 0;
- dataForkInfo.ioNamePtr := @fileName; { Use NIL if you don't care
- about receiving the name }
- OSResult := PBGetFCBInfoSync(@dataForkInfo);
- if (OSResult = noErr) DO BEGIN
- DoSomething(dataForkInfo);
- END;
- END;
-
-
- ---------------------------
-
- From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
- Subject: Touch-a-folder code -- can someone repost?
- Date: 9 Apr 92 21:41:48 GMT
- Organization: Kalamazoo College
-
- Someone posted code a while back to "touch" a folder of a changed file,
- thus forcing the Finder to update its listing. I can't remember what
- exactly the "touch" consisted of, and I neglected to archive that
- particular snippet.
-
- Could someone re-post it, or mail it to me please?
-
- Vielen Dank.
- - --
- Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
- "Almost all portables today employ passive-matrix LCDs, and no one expects
- active-matrix screens to be cost-competitive for a few years" -PC World 2/92
-
- +++++++++++++++++++++++++++
-
- From: d88-jwa@byse.nada.kth.se (Jon W{tte)
- Date: 10 Apr 92 16:11:44 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .kzoo.edu> k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
-
- Someone posted code a while back to "touch" a folder of a changed file,
- thus forcing the Finder to update its listing. I can't remember what
- exactly the "touch" consisted of, and I neglected to archive that
- particular snippet.
-
- It seems I play the generic folder-code server these days.
- Maybe I should unsibscribe :-)
-
- Straight from the treasure chest of my own code, for free:
-
- void
- TouchDir ( short vol , long dir ) // If the file is changed within vol , dir
- {
- CInfoPBRec info ;
- Name name ;
- short err ;
-
- BlockClear ( & info , sizeof ( info ) ) ; // Play Safe
- info . dirInfo . ioDrDirID = dir ;
- info . dirInfo . ioVRefNum = vol ;
- info . dirInfo . ioNamePtr = name ;
- info . dirInfo . ioFDirIndex = -1 ;
-
- err = PBGetCatInfo ( & info , 0 ) ; // Get the info on the folder
- if ( err ) {
-
- return err ;
- }
-
- info . dirInfo . ioCompletion = 0 ;
- info . dirInfo . ioDrDirID = info . dirInfo . ioDrParID ;
- info . dirInfo . ioFDirIndex = 0 ;
- GetDateTime ( & ( info . dirInfo . ioDrMdDat ) ) ; // This is now
-
- err = PBSetCatInfo ( & info , 0 ) ; // Set the modified time
-
- return err ;
- }
- - --
- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
-
- ---------------------------
-
- From: pietro@deis35.cineca.it (Pietro Caselli)
- Subject: Does anyone know about "Time-Saver Engines"?
- Date: 10 Apr 92 11:57:22 GMT
- Organization: Department of Mathematics, University of Bologna, Italy
-
- I hope that the Mac programmer community could help me. I do not usually
- read this newsgroup, so this may have come out agin in the past. Please
- forgive me it this is so, and answer me nonetheless.
-
- I have found in an old copy of the Mac Development Tool & Languages
- Guidebook (Fall 1989) an advertisement page about some source code called
- "Time-Saver Engines", containing a full-featured WP, an object oriented draw
- editor and a finder-like interface, from a SW firm called "DataPak Software"
-
- I tried to phone them, but the firm has moved and a different firm answered.
- I don't have a newer copy of the Guidebook, so I cannot check whether the
- advertisement page still exists.
-
- All I have is their address,
- DataPak Software, Inc.
- 14011 Ventura Boulevard #507
- Sherman Oaks, CA 91423
- Tel. 818 - 905-6419
-
- Does anyone know whether this firm still exists and sells this software? If
- it does, what is their address, telephone, fax or E-mail? If it does not, do
- you know whether it is possible to directly contact the authors or have in
- any other way a personal agreement for obtaining that code?
-
- I have used a friend account as there are some problem with my access to
- the news, and I don't usually read this newsgroup, so please e-mail me
- directly at
- fabio@cirfid.unibo.it.
-
- Thank you very much.
-
- Fabio Vitali
-
- - --
- Fabio Vitali There's a clear morale to this tale, now that
- Dept of Computer Science I think about it: when you're dead you're dead.
- Univ. of Bologna ITALY And yet another morale occurs to me now:
- e-mail: fabio@dm.unibo.it make love when you can. It's good for you.
- Kurt Vonnegut
- - --
- Pietro Caselli |
- Internet: pietro@deis35.cineca.it | IF YOU MEET THE BUDDHA
- zaphod@petruz.sublink.org | ON THE ROAD,KILL HIM.
-
- +++++++++++++++++++++++++++
-
- From: d88-jwa@byse.nada.kth.se (Jon W{tte)
- Date: 10 Apr 92 16:16:04 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .cineca.it> pietro@deis35.cineca.it (Pietro Caselli) writes:
-
- I have found in an old copy of the Mac Development Tool & Languages
- Guidebook (Fall 1989) an advertisement page about some source code called
- "Time-Saver Engines", containing a full-featured WP, an object oriented draw
- editor and a finder-like interface, from a SW firm called "DataPak Software"
-
- Does anyone know whether this firm still exists and sells this software? If
-
- Yes, it's called the word solutions engine these days, and has lots
- of add-ons available.
-
- it does, what is their address, telephone, fax or E-mail? If it does not, do
- you know whether it is possible to directly contact the authors or have in
-
- DataPak Software Inc
- 9317 NE Highway 99, Suite G
- Vancouver, Washington
- 98665-8900
- fax 206 573 9269
- - --
- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
-
- ---------------------------
-
- From: eburk@russian.sfsu.edu (Eli K. Burk)
- Subject: question: THINK C "real window" console available?
- Date: 9 Apr 92 20:41:14 GMT
-
- I am learning C and have decided to learn C first -then- experiment
- with the toolbox. However THINK C's console.h does not include a
- "real" mac window - has anyone written one. The best case would one in
- which I could just comment out console.h an have the code be ansi
- compliant.
-
- If one doesn't exist perhaps someone could make one available for ftp.
-
- eli
-
- p.s. thanks to all that helped me before
- (i.e. the "help me help myself" posting)
-
- +++++++++++++++++++++++++++
-
- From: dougm@cns.caltech.edu (Doug McNought)
- Date: 10 Apr 92 03:27:22 GMT
- Organization: California Institute of Technology
-
-
- In article <1992Apr9.134115.1716@nic.csu.net> eburk@russian.sfsu.edu (Eli K. Burk) writes:
-
- I am learning C and have decided to learn C first -then- experiment
- with the toolbox. However THINK C's console.h does not include a
- "real" mac window - has anyone written one. The best case would one in
- which I could just comment out console.h an have the code be ansi
- compliant.
-
- If one doesn't exist perhaps someone could make one available for ftp.
-
- What do you mean, "real"?? I am befogged. Please be more specific.
-
- - -doug
- - --
- <><><><><><><><><><><><><><><>Go Orioles<><><><><><><><><><><><><><><><>
- <> Doug McNaught dougm@descartes.caltech.edu <>
- <> Help!!! I'm addicted to *Spaceward Ho!* Is there a support group? <>
- <><><><><><><><><><><><><><><>Go Orioles<><><><><><><><><><><><><><><><>
-
- +++++++++++++++++++++++++++
-
- From: zobkiw@world.std.com (Joe Zobkiw)
- Organization: The World Public Access UNIX, Brookline, MA
- Date: Fri, 10 Apr 1992 14:11:29 GMT
-
- << If one doesn't exist perhaps someone could make one available for ftp.
- >>
-
- Hmmm...this makes no sense to me. If it doesn't exist, how can it be
- made available?
-
- In any case...you probably mean scrolling window? I would agree that it
- would be nice if THINK C's console window was a bit more like MPW's
- worksheet. I don't know if anything like this exists...but it may.
-
-
- - --
- <--------------------------------------------------->
- joe zobkiw zobkiw@world.std.com
- mac.synthesis.MIDI.development.C.asm.communications
- >---------------------------------------------------<
-
- ---------------------------
-
- From: mike@zorch.SF-Bay.ORG (Mike Smithwick)
- Subject: TextWidth Weirdness
- Date: 9 Apr 92 20:46:07 GMT
- Organization: SF-Bay Public-Access Unix
-
- []
-
- I am calling TextWidth to determine the width of a rectangle I need
- to block out some text, but the width is always falling short of the
- true width on the screen. It's coming out to be something like 80% of the
- real width. So the longer the string the more characters it skips. Is
- there something strange about TextWidth that I'm missing?
-
-
- mike
-
- - --
- "There is no problem too big that can't be solved with high explosives"-Rush
-
- Mike Smithwick - ames!zorch!mike
-
- +++++++++++++++++++++++++++
-
- From: zobkiw@world.std.com (Joe Zobkiw)
- Date: 10 Apr 92 14:16:20 GMT
- Organization: The World Public Access UNIX, Brookline, MA
-
- << I am calling TextWidth to determine the width of a rectangle I need
- to block out some text, but the width is always falling short of the
- true width on the screen. It's coming out to be something like 80% of the
- real width. So the longer the string the more characters it skips. Is
- there something strange about TextWidth that I'm missing? >>
-
- TextWidth probably works on the current port and the current font, size, and
- style (etc.) so you should make sure all of these things are set correctly
- before making to call.
-
-
- - --
- <--------------------------------------------------->
- joe zobkiw zobkiw@world.std.com
- mac.synthesis.MIDI.development.C.asm.communications
- >---------------------------------------------------<
-
- ---------------------------
-
- From: news@massey.ac.nz (USENET News System)
- Subject: Reading binary input
- Date: 9 Apr 92 23:25:41 GMT
- Organization: SMIS, Massey University, NZ
-
- This is a posting on behalf of a student without News access. He wants source
- code (any language) which takes a stream of binary input from a synchronous A/D
- converter plugged into a serial port of a IIci, and read it into a file.
- Someone has already suggested using the Sound Manager library, any comments on
- this, or other suggestions?
-
- Phil Etheridge Internet: P.Etheridge@massey.ac.nz
- Macintosh Consultant Phone: +64+6-356 9099 ext 8689
- SMIS, Massey University Fax: +64+6-350 5611
- Palmerston North, NZ 40*23'S, 175*37'E ; GMT+12
-
- +++++++++++++++++++++++++++
-
- From: zobkiw@world.std.com (Joe Zobkiw)
- Date: 10 Apr 92 14:19:32 GMT
- Organization: The World Public Access UNIX, Brookline, MA
-
- << This is a posting on behalf of a student without News access. He wants source
- code (any language) which takes a stream of binary input from a synchronous A/D
- converter plugged into a serial port of a IIci, and read it into a file.
- Someone has already suggested using the Sound Manager library, any comments on
- this, or other suggestions? >>
-
- You might want to check out the MacRecorder Hackers Toolkit which may
- still be available from Macromind/Paracomp. I know it's on America Online
- and probably CI$. It shows how to read and write audio data to the serial
- port and may be what you need.
-
-
- - --
- <--------------------------------------------------->
- joe zobkiw zobkiw@world.std.com
- mac.synthesis.MIDI.development.C.asm.communications
- >---------------------------------------------------<
-
- +++++++++++++++++++++++++++
-
- From: bill@extro.ucc.su.OZ.AU (William Logan Lee)
- Date: 11 Apr 92 08:39:40 GMT
- Organization: Uni Computing Service, Uni of Sydney, Australia
-
- In article <1992Apr9.232541.6361@massey.ac.nz> P.Etheridge@massey.ac.nz writes:
- >This is a posting on behalf of a student without News access. He wants source
- >code (any language) which takes a stream of binary input from a synchronous A/D
- >converter plugged into a serial port of a IIci, and read it into a file.
- >Someone has already suggested using the Sound Manager library, any comments on
- >this, or other suggestions?
-
- Perhaps I am misunderstanding the problem, but why doesn't he use a terminal
- emulator like "kermit" or "zterm" to capture the input, if it does not need
- to be processed in real time?
-
- If the information needs to be processed real-time, then what about using the
- Communications Toolbox routines?
-
- Although not recommended (but sometimes you have no choice), you can input
- a clock signal for some non-standard baud rate input to the port. You then
- have to muck about directly with the serial chip.
-
- Could you post a bit more info on what sort of input to the serial port
- you are trying to read and also whether there is real time processing
- needed?
-
- >Phil Etheridge
-
- Bill Lee
-
- ---------------------------
-
- From: jth@acpub.duke.edu (JASON HOLTZAPPLE)
- Subject: Symantec FTP Site
- Date: 9 Apr 92 23:12:09 GMT
- Organization: Duke University; Durham, N.C.
-
- Thanks to all of you who let me know that Symantec's ftp site is at
-
- ics.uci.edu
- in the mac/thinkc directory
-
- This info should be useful since I didn't see it in the FAQ.
- - -Jason Holtz
-
-
-
- - --
- | **** Jason Holtz jth@acpub.duke.edu ***** |
- | **** "And the knowledge that they fear is a weapon to be ***** |
- | **** used against them" - Rush, 1982 ***** |
-
- +++++++++++++++++++++++++++
-
- From: nielsen@bellcore.com (Jakob Nielsen)
- Date: 10 Apr 92 20:12:51 GMT
- Organization: Bellcore - Bell Communications Research
-
- OK, so what is the FTP site for Think *Pascal* ?
- - --
- Jakob Nielsen, nielsen@bellcore.com, fax (201) 829-2645
- Bellcore, MRE 2P-370, 445 South St., Morristown, NJ 09792-1910, USA
-
- ---------------------------
-
- From: bluecow@unix.cis.pitt.edu (Tobish E Smith)
- Subject: Doing playthru on a Quadra
- Date: 10 Apr 92 21:15:57 GMT
- Organization: University of Pittsburgh
-
- I'm trying to get continuous sound play-thru on my Quadra (a la the Audio
- dialog box in Hypercard 2.1). Having purused IM VI, it _seems_ that this
- should be possible with just two calls:
-
- err = SPBOpenDevice(NIL, siWritePermission, &myRefNum);
- SPBSetDeviceInfo(myRefNum, siPlayThruOnOff, daPtr);
-
- (where the value in daPtr is something between 1 and 7)
-
- I know there's a little PD program available (actually, it may be shareware...)
- called PlayThru which is supposed to do just this, but it doesn't work on
- my Quadra (even though the play-thru in Hypercard works fine), so I'm
- suspecting that perhaps the Q requires some extra code or something. Can
- anyone shed some light on this please?
-
- Thanks,
- Tob
-
- bluecow@unix.cis.pitt.edu
-
- +++++++++++++++++++++++++++
-
- From: sc5h+@andrew.cmu.edu (Shawn James Cokus)
- Date: 11 Apr 92 14:38:38 GMT
- Organization: Freshman, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
-
-
- >I'm trying to get continuous sound play-thru on my Quadra (a la the Audio
- >dialog box in Hypercard 2.1). Having purused IM VI, it _seems_ that this
- >should be possible with just two calls:
- >
- >err = SPBOpenDevice(NIL, siWritePermission, &myRefNum);
- >SPBSetDeviceInfo(myRefNum, siPlayThruOnOff, daPtr);
- >
- >(where the value in daPtr is something between 1 and 7)
- >
- >I know there's a little PD program available (actually, it may be
- shareware...)
- >called PlayThru which is supposed to do just this, but it doesn't work on
- >my Quadra (even though the play-thru in Hypercard works fine), so I'm
- >suspecting that perhaps the Q requires some extra code or something. Can
- >anyone shed some light on this please?
- >
- >Thanks,
- >Tob
- >
- >bluecow@unix.cis.pitt.edu
-
- I'm the author of "Play-Thru!" and the problem really isn't the Quadra,
- but System 7.0.1. When 7.0 was around, those two calls above would have
- set play-through on. However, something odd happened and now you also
- have to turn on meter levelling. Don't ask why. Don't ask how long it
- took me to figure that out. ;-) Anyways, I've been meaning to fix
- Play-Thru! 1.0 for a while, but in the process I've also been doing a
- massive overhaul into a cdev/INIT thing with new features; I can't
- promise it anytime soon...
-
- - --Shawn.
-
- ---------------------------
-
- From: Charles McClary <cmcclary@indiana.edu>
- Subject: How do you get the top, left, width, and heighth from a WIND
- Organization: Indiana University
- Date: Fri, 10 Apr 92 21:27:50 GMT
-
-
-
- +++++++++++++++++++++++++++
-
- From: jcav@quads.uchicago.edu (JohnC)
- Organization: The Royal Society for Putting Things on Top of Other Things
- Date: Fri, 10 Apr 1992 22:01:55 GMT
-
- Here's some code:
-
- TYPE
-
- WindowTHndl = ^WindowTPtr;
- WindowTPtr = ^WindowTemplate;
- WindowTemplate = record
- bounds: rect;
- procID: integer;
- visible: boolean;
- filler1: boolean;
- goAwayFlag: boolean;
- filler2: boolean;
- refCon: longint;
- title: Str255;
- end; { WindowTemplate = record }
-
-
- Just use this type to cast the result of _GetResource. Also, be aware that
- System 7 adds additional fields to the window template to implement the new
- auto-position feature (and possibly other things I don't know about).
-
-
- - --
- John Cavallino | EMail: jcav@midway.uchicago.edu
- University of Chicago Hospitals | John_Cavallino@uchfm.bsd.uchicago.edu
- Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
- B0 f++ c+ g+ k s++ e+ h- pv | Chicago, IL 60637
-
- +++++++++++++++++++++++++++
-
- From: jbush@magnus.acs.ohio-state.edu (John E Bush)
- Date: 11 Apr 92 04:20:44 GMT
- Organization: The Ohio State University
-
- This message is responded to as if you are using Think Pascal's library, but
- there is probably something equivalent for other development environments:
-
- There is a procedure in the CWindow class that returns a structure to you
- called GetFrame(var theFrame:LongRect) which returns the size of the
- window to you.
-
- ---------------------------
-
- Organization: City University of New York/ University Computer Center
- Date: Monday, 16 Mar 1992 19:26:39 EST
- From: <VALHC@CUNYVM.BITNET>
- Subject: BASIC on the mac
-
- A programmer I know who uses Micrsoft QuickBASIC for IBM compatibles is
-
- planning to do some work on the Mac and has asked me to pass on any helpful
- information regarding the availability of BASIC compilers for the mac.
-
- He is also interested in participating in any Macintosh application users'
-
- groups.
-
-
- Thanks in advance for any info...
-
-
- +++++++++++++++++++++++++++
-
- From: Ray.Arachelian@f204.n2603.z1.ieee.org (Ray Arachelian)
- Date: 27 Mar 92 04:02:00 GMT
- Organization: FidoNet node 1:2603/204 - Not Even Odd, Forest Hills NY
-
- On 03-16-92, VALHC@CUNYVM.BITNET wrote to ALL:
-
- V> A programmer I know who uses Micrsoft QuickBASIC for IBM compatibles
- V> is
- V>
- V> planning to do some work on the Mac and has asked me to pass on any
- V> helpful information regarding the availability of BASIC compilers for
- V> the mac.
-
- Microsoft has a Basic compiler for the Mac. There is also a company
- called Zedcor which produces a product called ZBasic.
-
- * Freddie 1.1 * You have been found guilty of commerce with the devil.
-
- - --
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- Ray Arachelian - Internet: Ray.Arachelian@f204.n2603.z1.ieee.org
-
- +++++++++++++++++++++++++++
-
- From: miyazaki@phoenix.Princeton.EDU (Takeshi Miyazaki)
- Organization: Princeton University
- Date: Wed, 1 Apr 1992 05:50:02 GMT
-
- In article <13251.29D7DD4E@zeus.ieee.org> Ray.Arachelian@f204.n2603.z1.ieee.org (Ray Arachelian) writes:
- >Microsoft has a Basic compiler for the Mac. There is also a company
- >called Zedcor which produces a product called ZBasic.
-
- Are they System 7 compatible?
-
- - --
- Takeshi Miyazaki (miyazaki@ee.princeton.edu)
-
- +++++++++++++++++++++++++++
-
- From: Ray.Arachelian@f204.n2603.z1.ieee.org (Ray Arachelian)
- Date: 9 Apr 92 21:59:00 GMT
- Organization: FidoNet node 1:2603/204 - Not Even Odd, Forest Hills NY
-
- On 04-01-92, MIYAZAKI@PHOENIX.PRINCETO wrote to ALL:
-
- M> Are they System 7 compatible?
-
- ZBasic isn't System 7 savvy, but it sure as hell is system 7 compatible.
-
- * Freddie 1.2b7 * You have been found guilty of commerce with the devil.
-
- - --
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- Ray Arachelian - Internet: Ray.Arachelian@f204.n2603.z1.ieee.org
-
- ---------------------------
-
- From: triantos@acsu.buffalo.edu (Nick B Triantos)
- Subject: More help with app startup tracing, please.
- Date: 19 Mar 92 14:21:27 GMT
- Organization: The University at Buffalo
-
- Hi.
-
- Thanks to all who helped me with info about tracing the loading of an
- application. I understand that CODE #0 sets up the jump table, but I'm still
- unclear as to what happens from there. A pointer is DEC.W'd (decremented,
- right?), and then a MOVE.W takes place, then _LoadSeg is called. After all of
- these steps are repeated, though, how am I able to know what segment is going
- to be JMP'ed to? For example, here's just one I'll make up:
-
- 000020 DC.W $0092
- 000022 MOVE.W #$0001,-(A7)
- 000026 _LoadSeg
-
- so, offset $0092 in segment CODE #1 is loaded, right? Does the JMP simply go
- to the first code segment in the jump table?
-
- Thanks in advance for any help...
-
- - -Nick
-
- - --
- Nick Triantos Grad Student, University at Buffalo. Why? I DON'T KNOW!
- "...and besides, she's a psycho hose-beast." - Wayne, from Wayne's World
-
- I! Hi'm a mtatng siugnaturei vir*ss. You cann~t reisth elping me spre]d !
-
- +++++++++++++++++++++++++++
-
- From: russotto@eng.umd.edu (Matthew T. Russotto)
- Date: Thu, 19 Mar 92 15:09:45 GMT
- Organization: College of Engineering, University of Maryland, College Park
-
- In article <1992Mar19.142133.4944@acsu.buffalo.edu> triantos@acsu.buffalo.edu (Nick B Triantos) writes:
- >Hi.
- >
- >Thanks to all who helped me with info about tracing the loading of an
- >application. I understand that CODE #0 sets up the jump table, but I'm still
- >unclear as to what happens from there. A pointer is DEC.W'd (decremented,
- >right?), and then a MOVE.W takes place, then _LoadSeg is called.
- Nope, the 68000 has no DEC instruction. "DC.W" means "stick this word
- length data in the code space"-- it is not an instruction. The code
- that loads the app jumps to the MOVE instruction
-
- > After all of
- >these steps are repeated, though, how am I able to know what segment is going
- >to be JMP'ed to? For example, here's just one I'll make up:
- >
- > 000020 DC.W $0092
- > 000022 MOVE.W #$0001,-(A7)
- > 000026 _LoadSeg
- >
- >so, offset $0092 in segment CODE #1 is loaded, right? Does the JMP simply go
- >to the first code segment in the jump table?
-
- Loadseg patches the location it is called from, resulting in the above
- being changed to
- 000020 DC.W $0092
- 000022 JMP xxxxxxxx
-
- Where 'xxxxxxxx' is the location in memory of the routine referred to.
-
- - --
- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu
- Some news readers expect "Disclaimer:" here.
- Just say NO to police searches and seizures. Make them use force.
- (not responsible for bodily harm resulting from following above advice)
-
- +++++++++++++++++++++++++++
-
- From: ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser)
- Date: 31 Mar 92 03:58:50 GMT
- Organization: MacDTS, Apple Computer
-
- In article <1992Mar19.150945.12860@eng.umd.edu>, russotto@eng.umd.edu (Matthew T. Russotto) writes:
- > > After all of
- > >these steps are repeated, though, how am I able to know what segment is going
- > >to be JMP'ed to? For example, here's just one I'll make up:
- > >
- > > 000020 DC.W $0092
- > > 000022 MOVE.W #$0001,-(A7)
- > > 000026 _LoadSeg
- > >
- > >so, offset $0092 in segment CODE #1 is loaded, right? Does the JMP simply go
- > >to the first code segment in the jump table?
- >
- > Loadseg patches the location it is called from, resulting in the above
- > being changed to
- > 000020 DC.W $0092
- > 000022 JMP xxxxxxxx
- >
- > Where 'xxxxxxxx' is the location in memory of the routine referred to.
-
- Useful hint:
-
- You can't trace over LoadSeg. This is because LoadSeg never returns; instead,
- it jumps through to the call you intend to go to. So what you can do is set
- the low memory global LoadTrap to a non-zero value, and the segment loader will
- break into the debugger before it jumps to the destination. (LoadTrap is a
- byte-long global at address $12D. In MacsBug, type "sb loadtrap 1" to turn
- this on and "sb loadtrap 0" to turn it off. If you're running without a
- complete Debugger Prefs file, replace "loadtrap" with "12D".)
-
- This is also really useful if you want to break at the start of a call, but its
- segment has not been loaded yet. You can break after the LoadSeg by setting
- loadtrap, and each time check to see if the function has been loaded yet.
-
- Enjoy!
- Tim Dierks
- MacDTS, but I'm not _all_ bad.
-
- +++++++++++++++++++++++++++
-
- From: Michael_Hecht@mac.sas.com (Michael Hecht)
- Date: 31 Mar 92 22:36:24 GMT
- Organization: SAS Institute Inc.
-
- In article <22203@goofy.Apple.COM>,
- ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser) writes:
- >
- > In article <1992Mar19.150945.12860@eng.umd.edu>,
- > russotto@eng.umd.edu (Matthew T. Russotto) writes:
- > > > After all of these steps are repeated, though, how am I able to know
- > > > what segment is going to be JMP'ed to?
- >
- > Useful hint:
- >
- > You can't trace over LoadSeg. This is because LoadSeg never returns; instead,
- > it jumps through to the call you intend to go to. So what you can do is set
- > the low memory global LoadTrap to a non-zero value, and the segment loader will
- > break into the debugger before it jumps to the destination.
-
- The "Debugger Prefs" file that comes with MacsBug 6.2.2 includes a handy macro
- for doing exactly that:
-
- GS
-
- which is defined as
-
- SB 12D 1;G;T 2;SB 12D 0
-
-
- - --Michael
-
- =======================================================================
- Michael P. Hecht | Internet: Michael_Hecht@mac.sas.com
- SAS Institute Inc.; Cary, NC USA | AppleLink: SAS.HECHT
-
- +++++++++++++++++++++++++++
-
- From: triantos@acsu.buffalo.edu (Nick B Triantos)
- Date: 1 Apr 92 05:57:43 GMT
- Organization: The University at Buffalo
-
- Forgive me for sounding naive, but I'm still not really able to follow what is
- going on during the segment loading process. CODE 0 tells the system to load a
- segment, maybe more than one at a time. Then it (I think) JMP's to the
- beginning of the segment, yes? I think that if I'm able to see what a program
- is doing just before, during, and after its startup screen is displayed, I may
- be able to figure out why I can't get it to work correctly.
-
- I'm no longer interested in making the program work, but I'd really love to
- understand the application startup process better.
-
- Thanks,
- - -Nick
-
-
- - --
- Nick Triantos Grad Student, University at Buffalo. Why? I DON'T KNOW!
- "...and besides, she's a psycho hose-beast." - Wayne, from Wayne's World
-
- I! Hi'm a mtatng siugnaturei vir*ss. You cann~t reisth elping me spre]d !
-
- +++++++++++++++++++++++++++
-
- From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
- Date: 2 Apr 92 08:31:25 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .buffalo.edu> triantos@acsu.buffalo.edu (Nick B Triantos) writes:
-
- Forgive me for sounding naive, but I'm still not really able to follow
- what is going on during the segment loading process. CODE 0 tells the
- system to load a segment, maybe more than one at a time. Then it
- (I think) JMP's to the beginning of the segment, yes?
-
- No.
-
- Inside Mac II has an explanation of the jump tables, and it's
- really not that hard to follow. A jump table entry for an unloaded
- segment consists of some offset information, segment information,
- and a LoadSeg trap. The LoadSeg trap checks who called it (the jump
- table; code 0) to get at the offset and segment information, and
- then loads that code resource, and jumps to the specified offset
- in that resource, after changing the entry in the jump table to
- a "JMP" instruction pointing at the now loaded code, and flushing
- the cache.
-
- As you see, a maximum of one segment is ever loaded at one time.
- What happens at startup is that your heap gets initialized, and
- the system runs the first jump table entry of CODE 0. The rest is
- up to what the compiler/linker generated.
-
- Some early viruses used this mechanism to patch into applications.
- However, any "generic" virus checker catches tampering with these
- structures now, so doing it again would be pretty pointless.
-
- - --
- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
-
- +++++++++++++++++++++++++++
-
- From: ksand@apple.com (Kent Sandvik)
- Date: 10 Apr 92 01:46:54 GMT
- Organization: MacDTS Mongols
-
- In article <1992Apr1.055747.12908@acsu.buffalo.edu>, triantos@acsu.buffalo.edu
- (Nick B Triantos) writes:
- >
- > Forgive me for sounding naive, but I'm still not really able to follow what is
- > going on during the segment loading process. CODE 0 tells the system to load
- a
- > segment, maybe more than one at a time. Then it (I think) JMP's to the
- > beginning of the segment, yes? I think that if I'm able to see what a program
- > is doing just before, during, and after its startup screen is displayed, I may
- > be able to figure out why I can't get it to work correctly.
- >
- > I'm no longer interested in making the program work, but I'd really love to
- > understand the application startup process better.
-
- Inside Macintosh, Second book, Segment Loader (second chapter) is what you need
- to read.
-
- Speaking about runtime issues, and especially model far which is a new beast
- to understand, the forthcoming MPW documentation has a good chapter which
- has an inside-out description of how everything works together. I can't say
- the exact day/time this documentation is ready, but we are speaking about months
- or maybe weeks.
-
- Cheers,
- Kent Sandvik
- Dynamic Language Materialist
-
- ---------------------------
-
- From: e-sink@uiuc.edu (Eric W. Sink)
- Subject: ATTN: Addison Weseley (sp): Book idea
- Date: 1 Apr 92 14:52:04 GMT
- Organization: University of Illinois at Urbana-Champaign
-
- I want a SMALL, INEXPENSIVE, INCOMPLETE reference to the Mac
- Toolbox. I'm thinking, like the size of a Star Trek novel,
- selling for 5.95 or something like that. Pack all the info you
- can into this thing of course, but I'd be happy with a prototype
- and a one line description of every toolbox call.
- I don't want IM crammed into a pocket book. I want a pocket book
- with as much Mac info as possible.
-
- Anybody else think this would be handy ?
-
- - --
- Eric W. Sink, Spatial Analysis and Systems Team
- USACERL, P.O. Box 9005, Champaign, IL 61826-9005
- 1-800-USA-CERL x449, e-sink@uiuc.edu
-
- +++++++++++++++++++++++++++
-
- From: alana@sisters.cs.uoregon.edu (Thomas Alan Akins)
- Organization: /local/lib/rn/organization
- Date: Wed, 1 Apr 1992 21:49:22 GMT
-
- In article <1992Apr1.145204.28834@sunb10.cs.uiuc.edu> e-sink@uiuc.edu writes:
- >I want a SMALL, INEXPENSIVE, INCOMPLETE reference to the Mac
- >Toolbox. I'm thinking, like the size of a Star Trek novel,
- >selling for 5.95 or something like that. Pack all the info you
- >can into this thing of course, but I'd be happy with a prototype
- >and a one line description of every toolbox call.
- >I don't want IM crammed into a pocket book. I want a pocket book
- >with as much Mac info as possible.
- >
- >Anybody else think this would be handy ?
-
- Could be... But why whine at A-W? They just publish, they don't write. If you
- want a book like that, write one yourself or (and this is REALLY outlandish)
- try asking Apple about it.
-
- About the price... well... you get what you pay for...
-
- - --
- * Alan Akins *
- * "I could say 'addition' alana@cs.uoregon.edu *
- * when I mean ... 'basketball.'" University of Oregon *
- * - E. Tick Department of Computer Science *
-
- +++++++++++++++++++++++++++
-
- From: a-giles@uchicago.edu (Aaron Giles)
- Date: 1 Apr 92 22:24:54 GMT
- Organization: University of Chicago High Energy Physics
-
-
- >I want a SMALL, INEXPENSIVE, INCOMPLETE reference to the Mac
- >Toolbox. I'm thinking, like the size of a Star Trek novel,
- >selling for 5.95 or something like that. Pack all the info you
- >can into this thing of course, but I'd be happy with a prototype
- >and a one line description of every toolbox call.
-
- Get yourself a copy of SaveATree and the MPW C .h files (from
- ftp.apple.com). Works for me ... at least until I can afford the IM
- volumes! :-)
-
- Aaron
- - -----
- Aaron Giles -- a-giles@uchicago.edu
- "You can't have everything ... where would you put it?"
-
- +++++++++++++++++++++++++++
-
- From: e-sink@uiuc.edu (Eric W. Sink)
- Organization: University of Illinois at Urbana-Champaign
- Date: Thu, 2 Apr 1992 14:03:35 GMT
-
- In <1992Apr1.214922.6125@cs.uoregon.edu> alana@sisters.cs.uoregon.edu (Thomas Alan Akins) writes:
-
- >Could be... But why whine at A-W? They just publish, they don't write. If you
- >want a book like that, write one yourself or (and this is REALLY outlandish)
- >try asking Apple about it.
-
- Whine ?
-
- Point taken, AW doesn't publish, but it seemed plausible to me that they
- know a few people who do write. You know, like maybe they know them better
- than I do. Maybe they could suggest that one of them write it. It's
- more of a compilation task than a writing one in my opinion. Still, it
- seemed to me that AW has more contacts in the writing industry.
- Besides, I only stuck AW in the title because I know they do tech stuff.
- I certainly didn't expect anyone at AW to read the message.
-
- Whine ?!?
-
- Write it myself ? Not an atrocious idea, but I can't really say that I
- have the time.
-
- WHINE ???!!!!!
-
- Ask Apple about it ? Yes, very outlandish. After six months, 2 emails,
- 2 written letters, and one phone call, I've *just* gotten the paperwork
- I needed from Apple licensing; and they sent the wrong forms. Square one,
- here I come.
-
- - --
- Eric W. Sink, Spatial Analysis and Systems Team
- USACERL, P.O. Box 9005, Champaign, IL 61826-9005
- 1-800-USA-CERL x449, e-sink@uiuc.edu
-
- +++++++++++++++++++++++++++
-
- From: d88-jwa@dront.nada.kth.se (Jon W{tte)
- Date: 2 Apr 92 22:22:49 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .uoregon.edu> alana@sisters.cs.uoregon.edu (Thomas Alan Akins) writes:
-
- The Mean C Compiler Author writes:
-
- >selling for 5.95 or something like that. Pack all the info you
- >can into this thing of course, but I'd be happy with a prototype
- >and a one line description of every toolbox call.
-
- >I don't want IM crammed into a pocket book. I want a pocket book
- >with as much Mac info as possible.
-
- Could be... But why whine at A-W? They just publish, they don't write.
- If you want a book like that, write one yourself or (and this is REALLY
- outlandish) try asking Apple about it.
-
- About the price... well... you get what you pay for...
-
-
- Using "egrep" it took me all of a minute to generate that book !
- Just filter the headers in some nice way, and there is your book.
- You could even print it on a laser and fold it yourself !
-
- Or at least, that info could serve as a nice ground for something
- with added text and styling.
-
- - --
- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
-
- +++++++++++++++++++++++++++
-
- From: eriks@lin.foa.se (Erik Svensson)
- Date: 3 Apr 92 09:30:49 GMT
- Organization: FOA, Linkoping, Sweden
-
- e-sink@uiuc.edu (Eric W. Sink) writes:
-
- >I want a SMALL, INEXPENSIVE, INCOMPLETE reference to the Mac
- >Toolbox. I'm thinking, like the size of a Star Trek novel,
- >selling for 5.95 or something like that. Pack all the info you
- >can into this thing of course, but I'd be happy with a prototype
- >and a one line description of every toolbox call.
- >I don't want IM crammed into a pocket book. I want a pocket book
- >with as much Mac info as possible.
-
- >Anybody else think this would be handy ?
-
- Well, I'd buy it. Perhaps add a "Where-to-look-for-more-info-about-this-call"
- line.
-
- >--
- >Eric W. Sink, Spatial Analysis and Systems Team
- >USACERL, P.O. Box 9005, Champaign, IL 61826-9005
- >1-800-USA-CERL x449, e-sink@uiuc.edu
-
- Erik Svensson, Guided Weapons Division, National Defense Research Establishment
- (FOA) Stockholm, Sweden
- - --
- Erik Svensson Research Officer
- Guided Weapons Division National Defense Research Establishment (FOA)
- Stockholm Sweden
-
- net.address: eriks@fenix.lin.foa.se /* preferred */
- erik@helios1.sto.foa.se
-
- && This .sig is protected by SIGinfectant(tm). Look for the &&, a sure sign of
-
- +++++++++++++++++++++++++++
-
- From: burglin@amber.mgh.harvard.edu (Thomas Burglin)
- Date: 6 Apr 92 06:25:00 GMT
- Organization: Molecular Biology, Massachusetts General Hospital, Boston
-
- In article <1992Apr3.093049.17563@lin.foa.se>, eriks@lin.foa.se (Erik Svensson) writes...
- >e-sink@uiuc.edu (Eric W. Sink) writes:
- >
- >>I want a SMALL, INEXPENSIVE, INCOMPLETE reference to the Mac
- >>Toolbox. I'm thinking, like the size of a Star Trek novel,
- >>selling for 5.95 or something like that. Pack all the info you
- >>can into this thing of course, but I'd be happy with a prototype
- >>and a one line description of every toolbox call.
- >>I don't want IM crammed into a pocket book. I want a pocket book
- >>with as much Mac info as possible.
- >
- >>Anybody else think this would be handy ?
-
- Well, I also wish for something like that. At the moment the
- best alternative for me is Think Reference, but it's missing Volume 6.
- Thomas Burglin
-
- +++++++++++++++++++++++++++
-
- From: burglin@amber.mgh.harvard.edu (Thomas Burglin)
- Date: 6 Apr 92 06:25:00 GMT
- Organization: Molecular Biology, Massachusetts General Hospital, Boston
-
- In article <1992Apr3.093049.17563@lin.foa.se>, eriks@lin.foa.se (Erik Svensson) writes...
- >e-sink@uiuc.edu (Eric W. Sink) writes:
- >
- >>I want a SMALL, INEXPENSIVE, INCOMPLETE reference to the Mac
- >>Toolbox. I'm thinking, like the size of a Star Trek novel,
- >>selling for 5.95 or something like that. Pack all the info you
- >>can into this thing of course, but I'd be happy with a prototype
- >>and a one line description of every toolbox call.
- >>I don't want IM crammed into a pocket book. I want a pocket book
- >>with as much Mac info as possible.
- >
- >>Anybody else think this would be handy ?
-
- Well, I also wish for something like that. At the moment the
- best alternative for me is Think Reference, but it's missing Volume 6.
- Thomas Burglin
-
- +++++++++++++++++++++++++++
-
- From: ksand@apple.com (Kent Sandvik)
- Date: 10 Apr 92 22:58:57 GMT
- Organization: MacDTS Mongols
-
- In article <1992Apr1.145204.28834@sunb10.cs.uiuc.edu>, e-sink@uiuc.edu (Eric W.
- Sink) writes:
- >
- > I want a SMALL, INEXPENSIVE, INCOMPLETE reference to the Mac
- > Toolbox. I'm thinking, like the size of a Star Trek novel,
- > selling for 5.95 or something like that. Pack all the info you
- > can into this thing of course, but I'd be happy with a prototype
- > and a one line description of every toolbox call.
- > I don't want IM crammed into a pocket book. I want a pocket book
- > with as much Mac info as possible.
- >
- > Anybody else think this would be handy ?
-
- Robin Muir and Jeff Alger did a similar book long time ago for
- MacApp 2.0, MADA published this one and it run out of stock/print
- within months. I'm sure there's a market for a similar small
- spiral-bound lookup-manual. Check out the MacApp version for the
- design, it's really slick.
-
- Kent
- ..who never got one of 'em.
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-